{template 'admin','header'}
<form action="{$self_url}?action={$action}" method="post" name="myform" onsubmit="r_submit(this)">
    {if $action=='process_edit'}
    <input type="hidden" name="id" value="{$data['id']}">
    {/if}
    <input type="hidden" name="forward" value="{$self_url}?action=process_list&workflowid={$workflowid}">
    <input type="hidden" name="workflowid" value="{$workflowid}">
    <table cellpadding="2" cellspacing="1" class="table_form">
        {if $action=='process_add'}
        <caption>添加工作流步骤</caption>
        {else}
        <caption>修改工作流步骤</caption>
        {/if}
        <tr>
            <th><strong>步骤名称</strong></th>
            <td><input type="text" name="data[name]" id="name" size="30" value="{$data['name']}"> <font color="red">*</font></td>
        </tr>

        <tr>
            <th><strong>步骤描述</strong></th>
            <td><textarea name="data[description]" rows="2" cols="20" id="description" class="inputtext" style="height:100px;width:300px;">{$data['description']}</textarea></td>
        </tr>
        <tr>
            <th><strong>通过的操作名称</strong></th>
            <td><input type="text" name="data[passname]" id="passname" size="30" value="{$data['passname']}"> <font color="red">*</font></td>

        </tr>
        <tr>
            <th><strong>通过的状态</strong></th>
            <td>
                {form::select($status, 'data[passstatus]', 'passstatus', isset($data['passstatus'])?$data['passstatus']:'')}
                <font color="red">*</font>
            </td>
        </tr>
        <tr>
            <th><strong>退回的操作名称</strong></th>
            <td><input type="text" name="data[rejectname]" id="rejectname" size="30" value="{$data['rejectname']}"> <font color="red">*</font></td>
        </tr>
        <tr>
            <th><strong>退回的状态</strong></th>
            <td>
                {form::select($status, 'data[rejectstatus]', 'rejectstatus', isset($data['rejectstatus'])?$data['rejectstatus']:'')}
                <font color="red">*</font>
            </td>
        </tr>
        <tr>
            <th><strong>此步骤可操作的状态</strong></th>
            <td>
                {form::checkbox($status, 'prestatus', 'prestatus', isset($data['prestatus'])?$data['prestatus']:'')}
            </td>
        </tr>
        <tr>
            <th></th>
            <td>
                <input type="submit" name="submitform" value=" 确定 ">
                &nbsp; <input type="button" value=" 返回 " onclick="window.location='{HTTP_REFERER}'">
            </td>
        </tr>
    </table>
</form>
{template 'admin','footer'}